package com.ruoyi.omsampuser.service.impl;

import java.util.HashMap;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.omsampuser.mapper.OmSampuserMapper;
import com.ruoyi.omsampuser.domain.OmSampuser;
import com.ruoyi.omsampuser.service.IOmSampuserService;

/**
 * 用户文章连接Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-24
 */
@Service
public class OmSampuserServiceImpl implements IOmSampuserService 
{
    @Autowired
    private OmSampuserMapper omSampuserMapper;

    /**
     * 查询用户文章连接
     * 
     * @param sampuserId 用户文章连接主键
     * @return 用户文章连接
     */
    @Override
    public OmSampuser selectOmSampuserBySampuserId(Long sampuserId)
    {
        return omSampuserMapper.selectOmSampuserBySampuserId(sampuserId);
    }

    /**
     * 查询用户文章连接列表
     * 
     * @param omSampuser 用户文章连接
     * @return 用户文章连接
     */
    @Override
    public List<OmSampuser> selectOmSampuserList(OmSampuser omSampuser)
    {
        return omSampuserMapper.selectOmSampuserList(omSampuser);
    }

    /**
     * 新增用户文章连接
     * 
     * @param omSampuser 用户文章连接
     * @return 结果
     */
    @Override
    public int insertOmSampuser(OmSampuser omSampuser)
    {
        return omSampuserMapper.insertOmSampuser(omSampuser);
    }

    /**
     * 修改用户文章连接
     * 
     * @param omSampuser 用户文章连接
     * @return 结果
     */
    @Override
    public int updateOmSampuser(OmSampuser omSampuser)
    {
        return omSampuserMapper.updateOmSampuser(omSampuser);
    }

    /**
     * 批量删除用户文章连接
     * 
     * @param sampuserIds 需要删除的用户文章连接主键
     * @return 结果
     */
    @Override
    public int deleteOmSampuserBySampuserIds(Long[] sampuserIds)
    {
        return omSampuserMapper.deleteOmSampuserBySampuserIds(sampuserIds);
    }

    /**
     * 删除用户文章连接信息
     * 
     * @param sampuserId 用户文章连接主键
     * @return 结果
     */
    @Override
    public int deleteOmSampuserBySampuserId(Long sampuserId)
    {
        return omSampuserMapper.deleteOmSampuserBySampuserId(sampuserId);
    }

    @Override
    public OmSampuser getCheckInfo(Long saId, String openId) {
        return omSampuserMapper.getCheckInfo(saId,openId);
    }

    @Override
    public HashMap<String,Object> getCheckInfoMap(Long saId, String openId) {
        return omSampuserMapper.getCheckInfoMap(saId,openId);
    }

    @Override
    public int uncollect(OmSampuser omSampuser) {
        return omSampuserMapper.uncollect(omSampuser);
    }
}
